<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
            <div class="layui-form-item">
                <label class="layui-form-label required"  >姓名：</label>
                <div class="layui-input-block">
                    <input type="text" name="name" value="" lay-verify="required" class="layui-input field-name" placeholder="请输入姓名">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label required"  >手机号：</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" value="" lay-verify="required" class="layui-input field-phone" placeholder="请输入手机号">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">校区：</label>
                <div class="layui-input-block">
                        <select name="campus_id" class="field-campus_id">
                            <option value="">请选择校区</option>
                            {volist name="campusList" id="name" }
                            <option value="{$key}">{$name}</option>
                            {/volist}
                        </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">课程：</label>
                <div class="layui-input-block">
                        <select name="course_id" lay-search="" class="field-course_id">
                            <option value="">请选择课程</option>
                            {volist name="courseList" id="name" key="id"}
                            <option value="{$id}">{$name}</option>
                            {/volist}
                        </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">来源：</label>
                <div class="layui-input-block">
                        <select name="source_id" lay-search="" class="field-source_id">
                            <option value="">请选择来源</option>
                            {volist name="sourceList" id="name" key="id"}
                            <option value="{$id}">{$name}</option>
                            {/volist}
                        </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注：</label>
                <div class="layui-input-block">
                  <textarea name="remark"  placeholder="请输入备注内容" class="layui-textarea field-remark"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
</div>

<script>
    // 扩展模块  config的设置是全局的
    layui.config({
        base: '/static/crm/js/modules/' //假设这是你存放拓展模块的根目录
    });

    layui.use(['form','jquery', 'layer', 'func'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        layui.func.assign({:json_encode($data)});   // 解析数据
    });
</script>

</body>
</html>